package com.iflytek.xfapi.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import static com.iflytek.xfapi.chat.imageGen.MyUtil.imageCreate;

/**
 * 图片生成
 */
@RestController
@RequestMapping("/xfapi/imageCreate")
public class ImageCreateController {
    //传输过来一句话，让他生成
    @GetMapping("/{str}")
    public String upload(@PathVariable("str") String str) {
        String url = imageCreate(str,null);
        return url;
    }
}
